package sip;

/**
 * Simple Basal Profile Class
 * @author Stephen
 */
public class BasalProfile {
    /** Member Attributes */
    // saves basal profile as an array
    public double[] mProfile = new double[24];
    // saves basal profile name as string
    private String mProfileName = new String(); 
    // saves whether a profile is active or not
    private boolean mActive;
    
    /** Constructor */
    public BasalProfile() {
        mActive = false;
        mProfileName = "";
    }
    
    public void setBasalProfileInsulinValues(Double[] basalProfileInsulinValues)
    {
        for(int i=0;i<=24;i++)
        {           
            this.mProfile[i] = basalProfileInsulinValues[i];       
        }
    }
    
    public double[] getBasalProfileInsulinValues()
    {
        return (this.mProfile);
    }
    public void setActiveStatus(boolean status) {
        mActive = status;
    }
    public boolean getActiveStatus() {
        return mActive;
    }
    public void setProfileName(String name) {
        mProfileName = name;
    }
    public String getProfileName() {
        return mProfileName;
    }
    
    ///Displays the BasalProfile to System.out
    public void display() {
        for(int iter = 0; iter < 24; iter++) {
            System.out.println("Hour:\t" + iter + "\tRate:\t" + mProfile[iter]);
        }
    }
    
    ///Used for testing this class
//    public static void main (String args[]) {
//         BasalProfile myProfile = new BasalProfile();
//    }
}
